home *** CD-ROM | disk | FTP | other *** search
/ Family Fun / Family Fun.iso / joke1 / jokes_m / merry.jok < prev    next >
Text File  |  1992-01-07  |  50KB  |  2,072 lines

  1. Article 254 of comp.sources.misc:
  2. Path: puukko!santra!tut!enea!mcvax!uunet!husc6!ukma!tut.cis.ohio-state.edu!mandrill!hal!ncoast!allbery
  3. From: rsk@mace.cc.purdue.edu (Rich Kulawiec)
  4. Newsgroups: comp.sources.misc
  5. Subject: v03i076: Just for fun (something which once appeared on the net)
  6. Message-ID: <8807101545.AA21634@mace.cc.purdue.edu>
  7. Date: 10 Jul 88 15:45:48 GMT
  8. Sender: allbery@ncoast.UUCP
  9. Reply-To: rsk@mace.cc.purdue.edu (Rich Kulawiec)
  10. Lines: 2008
  11. Approved: allbery@ncoast.UUCP
  12.  
  13. Posting-number: Volume 3, Issue 76
  14. Submitted-by: "Rich Kulawiec" <rsk@mace.cc.purdue.edu>
  15. Archive-name: xmases
  16.  
  17. [Only half a year late...  ;-)  ++bsa]
  18.  
  19. I found this while doing some housecleaning in my account, and thought
  20. it was marginally interesting enough to send along to you.
  21.  
  22. ---Rsk
  23.  
  24. From: ded@aplvax.UUCP
  25. Newsgroups: net.misc
  26. Subject: Merry Christmas Programs
  27. Organization: JHU/Applied Physics Lab, Laurel, MD
  28.  
  29.  
  30.  
  31. Well, here it is: the long awaited list of "Merry Christmas" programs.  
  32. If you are a crawled-out-from-under-a-rock sort of person and don't 
  33. know what's going on here, then you should read the following sentence:
  34. I don't know what's going on here either.  For some reason, I wanted
  35. to collect a group of programs which print the phrase "Merry Christmas"
  36. 15 times.  If you can figure out why I wanted to do this, please let 
  37. me know.
  38.  
  39. Thanks alot to all the nice folks who inundated me with mail.  Some of 
  40. the submissions made extremely clever use of editors and utility languages
  41. (I'm particularly fond of the UNIX shell script by Ben Hyde).  A few errors
  42. probably crept in due to transmission errors and my editing, and for that
  43. I apologize (because you're probably gonna be swamped by a horde of
  44. prepubescent fault finders).
  45.  
  46. Several of you requested that I (1) send you personal copies of the results,
  47. (2) send you only the more interesting examples, or (3) send you a report
  48. contrasting and comparing the various syntaxes.  I lost all your names.
  49.  
  50. If you sent me a submission and it wasn't included, then it either duplicated
  51. a previous entry or never arrived.  I deleted many comments to save space. 
  52. In retrospect, that was probably a mistake.
  53.                         --Don Davis
  54. ==========================================================================
  55.  
  56. /* 6502 assembly */
  57.  
  58. START    LDX #$0F
  59. LOOP1    LDY #$10
  60. LOOP2    LDA MCDATA,Y
  61.     JSR $FDF0    (CHAROUT or something like that)
  62.     DEY
  63.     BPL LOOP2
  64.     DEX
  65.     BPL LOOP1
  66.     RTS
  67.  
  68. MCDATA    ASC "
  69.  
  70.             ~ Kenn Frankel
  71.  
  72.             ...!sdcsvax!sdccs6!ix192
  73.  
  74. ==========================================================================
  75.  
  76. /* Ada version */
  77.  
  78.     with text_io; use text_io;
  79.     program print_merry_christmas is
  80.  
  81.     begin
  82.         for i in 1..15 loop
  83.             put("Merry Christmas"); new_line;
  84.         end loop;
  85.     end print_merry_Christmas;
  86.  
  87. I tested the program using the SuperSoft/Maranatha Ada compiler.
  88.    -- Dave Norris
  89.  
  90. ==========================================================================
  91.  
  92. /*  Ada  */
  93.  
  94. /*  This program is merely an ordinary loop.  It was developed by    */
  95. /*  Rob Pearce of JHU/APL. Oh yes; Rob is English.                    */
  96.  
  97.     1   with text_io; use text_io;
  98.     2
  99.     3   procedure number_a is
  100.     4
  101.     5     i_max:constant integer:=15;
  102.     6     type i_type is range 1..i_max;
  103.     7
  104.     8     package i_type_io is new integer_io(num=>i_type);
  105.     9
  106.    10   begin  -- number_a
  107.    11     for i in i_type loop
  108.    12       i_type_io.put(item=>i,
  109.    13                     width=>2);
  110.    14       put("  " &
  111.    15           "God save the Queen");
  112.    16       new_line;
  113.    17     end loop;
  114.    18   end number_a;
  115.  
  116. ==========================================================================
  117.  
  118. /* Ada */
  119.  
  120. -- This program counts to 15, but does so  via  three  "concurrently
  121. -- executing"  tasks.   The  output has been modified to be a single
  122. -- character instead of the full  "Merry  Christmas"  message.   The
  123. -- first  task  prints,  sequentially,  0..4.  The second prints, in
  124. -- turn, 5..9; and the third sequentially prints A..E.
  125. -- 
  126. -- If we had used the full "Merry Christmas" line,  then  the  three
  127. -- concurrent  tasks would have (almost certainly) interleaved their
  128. -- respective character strings, and one would have not been able to
  129. -- read any of the messages!
  130. -- 
  131. -- The program was developed by Rob Pearce of JHU/APL, and  was  run
  132. -- on a validated Ada system, the NY University, Ada/ED. The machine
  133. -- was a VAX-11/750 under typical loading. (Note the times;  they're
  134. -- about  the  same  on an empty machine, too!) The listing has been
  135. -- edited to remove the "uninteresting" lines and the  #$^&  control
  136. -- characters.
  137. --                    Mars Gralia
  138. --                    11/11/8
  139.  
  140. NYU ANSI-Ada/ED 1.1(11-Apr-83)            FRI  11 NOV 83  09:27:31   PAGE     1
  141.  
  142.     1   with text_io; use text_io;
  143.     2
  144.     3   procedure number_f is
  145.     4
  146.     5     task A;
  147.     6     task B;
  148.     7     task C;
  149.     8
  150.     9
  151.    10     task body A is
  152.    11
  153.    12     begin  -- A
  154.    13       for ch in character range '0'..'4' loop
  155.    14         put(ch);
  156.    15       end loop;
  157.    16     end A;
  158.    17
  159.    18
  160.    19     task body B is
  161.    20
  162.    21     begin  -- B
  163.    22       for ch in character range '5'..'9' loop
  164.    23         put(ch);
  165.    24       end loop;
  166.    25     end B;
  167.    26
  168.    27
  169.    28     task body C is
  170.    29
  171.    30     begin  -- C
  172.    31       for ch in character range 'A'..'E' loop
  173.    32         put(ch);
  174.    33       end loop;
  175.    34     end C;
  176.    35
  177.    36
  178.    37   begin  -- number_f
  179.    38     null;
  180.    39   end number_f;
  181.  
  182.   No translation errors detected
  183.   Translation time: 69 seconds
  184.  
  185.  
  186. NYU ANSI-Ada/ED 1.1(11-Apr-83)            FRI  11 NOV 83  10:34:05   PAGE     1
  187.  
  188.   Binding time: 3.3 seconds
  189.  
  190.   Begin Ada execution
  191.  
  192. 5A06B127C38D94E
  193.  
  194.   Execution complete
  195.   Execution time: 51 seconds
  196.   I-code statements executed: 97
  197.  
  198. ==========================================================================
  199.  
  200. /* Algol-60 */
  201.  
  202. begin comment Algol-60 version.  "Print" is system defined;
  203. integer i;
  204.  
  205. for i := 1 step 1 until 15 do Print("Merry Christmas")
  206.  
  207. end
  208.  
  209.                   --  chip elliott     ...decvax!dartvax!chip
  210.  
  211. ==========================================================================
  212.  
  213. /* Algol-68 */
  214.  
  215.     BEGIN
  216.     TO 15
  217.         DO
  218.         print(("Merry Christmas",newline))
  219.         OD
  220.     END
  221.  
  222.       -- Andrew Klossner   (decvax!tektronix!tekecs!andrew)  [UUCP]
  223.                    (andrew.tektronix@rand-relay)     [ARPA]
  224.  
  225.  
  226. ==========================================================================
  227.  
  228. /* APL */
  229. __
  230. \/ PROG ; S
  231.      ___                    __
  232. [1]  ! ! <- (15, pS) p S <- 'Merry Christmas'   \/
  233.      ---
  234.  
  235. Here's an APL version.  Since APL uses more than the ASCII character set,
  236. I had to fake it some.  The triangle is the greek character 'del' (an
  237. upside-down delta), the first symbol on line [1] is a 'quad', a
  238. rectangular block, the '<-' is a left arrow, and the lower-case 'p'
  239. is the greek character 'rho'.  Have fun.
  240.  
  241.                     ^-^ Bruce ^-^
  242.  
  243. ==========================================================================
  244.  
  245. /* APL */
  246.  
  247.     15 15 rho 'Merry Christmas'
  248.  
  249. (rho is the greek letter of that name, the reshape operator in APL)
  250.  
  251. That may not count, since it's more like an expression than a
  252. program, but it will do what you asked for.  I guess you could make
  253. it a program if you wanted, as follows:
  254.  
  255.     del merry
  256.     [1] 15 15 rho 'Merry Christmas'
  257.     del
  258.  
  259. (del is a little upside-down triangle)
  260.  
  261.                     Joe Ziegler
  262.                     ...ihnp4!pegasus!lzmi!ziegler
  263.  
  264. ==========================================================================
  265.  
  266. /* APL */
  267.  
  268.     Here is an APL Merry Christmas. Since APL uses a different chracter set,
  269. I will use the following identifiers for non-ascii chracters:
  270.     RHO - greek letter rho
  271.     BOX - the rectangle or window character
  272.     ASGN - the back-arrow assignment character
  273.     TRI - upside-down triangle
  274.  
  275. TRI merry ; mesg
  276. BOX ASGN (15,RHO mesg)RHO mesg ASGN "Merry Christmas"
  277. TRI
  278.  
  279.             ---From some unknown person on the other side of uucp 
  280.  
  281. ==========================================================================
  282. /* AWK */
  283.     awk 'BEGIN {for (i=1;i<=15;i++) print "Merry Xmas"}' /dev/null
  284.  
  285.             From: seismo!mcvax!steven (Steven Pemberton)
  286. ==========================================================================
  287.  
  288. /* AWK */
  289. (note that it wants some standard input):
  290.     
  291. BEGIN { for (i = 0; i < 15; i++) {
  292.     printf "Merry Christmas\n"
  293.     }   
  294. }   
  295.     
  296.             From: David Chase <rbbb@rice>
  297.                 
  298. ==========================================================================
  299.  
  300. /* B */
  301. (not the predecessor of "C", by the way).
  302.  
  303.     HOW'TO MERRY'CHRISTMAS:
  304.     FOR i IN {1..15}:
  305.         WRITE 'Merry Christmas' /
  306.  
  307. The string quote in B is used like the underscore in "C".
  308. HOW'TO introduces a procedure declaration.
  309. Indentation is used for grouping statements.
  310. The slash is used in WRITE-commands to indicate a newline.
  311. Actually, this definition should be followed by a call:
  312.  
  313.     MERRY'CHRISTMAS
  314.  
  315. You could also write the body of the procedure instead of the call,
  316. and then would have no need for the definition ("B" has no clear
  317. notion of what a program is; usually it's a group of procedures
  318. and functions living together in a workspace).
  319.  
  320. --
  321. Guido van Rossum, "B Group",
  322. Centre for Mathematics and Computer Science, (CWI, formerly MC), Amsterdam
  323. {philabs,decvax}!mcvax!guido
  324.  
  325. ==========================================================================
  326.  
  327. /* Applesoft BASIC */
  328.  
  329. 10 FOR I = 1 TO 10 : PRINT "MERRY CHRISTMAS" : NEXT I
  330.  
  331.             ---From some unknown person on the other side of uucp 
  332.  
  333. ==========================================================================
  334.     
  335. /* Basic-Plus (DEC Basic on RSTS/E) */
  336.     
  337.         10    ! Merry Christmas program &
  338.             ! Written by David Kaufman for Usenet survey
  339.     
  340.         20 For I = 1 to 15 \ &
  341.             Print "Merry Christmas" \ &
  342.             Next I
  343.     
  344.         30 End     ! Optional, but helps reloading command
  345.     
  346.         Merry Christmas!
  347.             David Kaufman
  348.             ...decvax!yale-comix!kaufman
  349.  
  350. ==========================================================================
  351.  
  352. /* BASIC */
  353.  
  354. 1000 i=0
  355. 1010 if i=15 then goto 1050
  356. 1020 print 'Merry Christmas'
  357. 1030 i = i+1
  358. 1040 goto 1010
  359. 1050 end
  360.  
  361.                         That's All
  362.                         Dave Wargo
  363.                         UCSD
  364.  
  365. ==========================================================================
  366.  
  367. /* bc */
  368.  
  369. bc<<!
  370. for(i=19^83;i<=19^83+14;i++) "Merry Christmas
  371. "
  372. !
  373.                     --unknown hacker
  374.  
  375. ==========================================================================
  376.  
  377. /* BCPL */
  378.  
  379.         // Cambridge IBM implementation
  380.         get "libhdr"
  381.         let start(parm) be $(
  382.             selectoutput(findoutput("sysprint"))
  383.             for i := 1 to 15 do writef("Merry Christmas*N")
  384.         $)  
  385.  
  386.                     These languages courtesy of:
  387.                         Pavel Curtis, Cornell
  388.                         Mike Caplinger, Rice
  389.  
  390. ==========================================================================
  391.  
  392. /* BCPL */
  393.  
  394. GET "libhdr"
  395.  
  396. LET start() BE
  397.     FOR index = 1 TO 15 DO writes("Merry Christmas*n")
  398.  
  399.  
  400.             From: jd@ukc.UUCP
  401.             Organization: Computing Lab. Kent University, England
  402.  
  403. ==========================================================================
  404.  
  405. /* Bliss-11 */
  406.  
  407. module Christmas =
  408. begin \Main\
  409.  
  410. external MsgScan;
  411. local i;
  412.  
  413. incr i from 1 to 15 do
  414.   MsgScan( uplit asciz "Merry Christmas%C" );
  415.  
  416. end \Main\
  417. eludom
  418.  
  419.                 From: leiby
  420.  
  421. ==========================================================================
  422.  
  423. /* C */
  424.  
  425. main()
  426. {
  427.     int i;
  428.  
  429.     for (i=0; i<15; i++)
  430.         printf("Merry Christmas\n");
  431. }
  432.                         by Don Davis
  433.  
  434. ==========================================================================
  435.  
  436. /* CDC 6000-type assembly */
  437.  
  438.         IDENT   MERRY
  439.         ENTRY   MERRY
  440.         SYSCOM  B1
  441.  
  442. OUTPUT  FILEB   OBUF,101B,FET=8
  443. OBUF    BSS     101B
  444.  
  445. COUNT   DATA    14
  446.  
  447.  
  448. MERRY   SB1     1
  449.  
  450. MERRY1  WRITEC  OUTPUT,(=C*MERRY CHRISTMAS*)
  451.  
  452.         SA1     COUNT
  453.         SX6     X1-1
  454.         SA6     COUNT
  455.         NZ      X1,MERRY1
  456.  
  457.         WRITER  OUTPUT,R
  458.         ENDRUN
  459.         END     MERRY
  460.  
  461. Jeff Lee
  462. CSNet:    Jeff @ GATech        ARPA:    Jeff.GATech @ CSNet-Relay
  463. uucp:    ...!{sb1,allegra,ut-ngp}!gatech!jeff ...!duke!mcnc!msdc!gatech!jeff
  464.  
  465. ==========================================================================
  466.  
  467. /* CGOL */
  468. ( an extensible language that translates into MACLISP)
  469.  
  470.     for i in 1 to 15 do print "Merry Christmas"<ESC>
  471.  
  472. The value of this expression is nil, if you really want a list of them,
  473.  
  474.     for i in 1 to 15 collect "Merry Christmas"<ESC>
  475.  
  476.                 Garret Swart
  477.  
  478. ==========================================================================
  479.  
  480. /* CLI */
  481. To print Merry Christmas 15 times under Data General's CLI's (command line
  482. interpreters):
  483.  
  484.     RDOS, RTOS, DOS:    MESSAGE Merry Christmas(,,,,,,,,,,,,,,,)
  485.     AOS, AOS/VS:        write Merry Christmas(,,,,,,,,,,,,,,,)
  486.  
  487. (for your information, the parenthesis indicate that the command will be
  488. executed multiple times, with possible subsitutions, so "write a(b,c) d" would
  489. write two lines:  "abd" and "acd".  Since nothing is substituted, the same
  490. command is executed 15 times.  BTW, write can be abreviated to "wr", "wri", ...)
  491.  
  492.                 Michael Meissner
  493.                 Data General Corporation
  494.                 ...{allegra, decvax!ittvax, rocky2}!datagen!mrm
  495.  
  496. ==========================================================================
  497.  
  498. /* CLU */
  499.  
  500. start_up = proc ()
  501.     po: stream := stream$primary_output ()
  502.     for i: int in int$from_to (1, 15) do
  503.         stream$putl (po, "Merry Christmas")
  504.     end
  505.     end start_up
  506.  
  507.                 Happy Hacking!
  508.  
  509.                 Russell Finn
  510.                 {decvax, eagle, mit-eddie}!mit-vax!russ
  511.                 RUSS%MIT-VAX@MIT-ML
  512.  
  513. ==========================================================================
  514.  
  515. /* CLU */
  516. (Liskov, August 1977 CACM)
  517.  
  518. start_up = proc ()
  519.    for i: int in int$from_to(1, 15) do
  520.       stream$putl(stream$primary_output(), "Merry Christmas")
  521.    end
  522. end start_up
  523.  
  524.             Original-From:     J. Dean Brock <brock@unc>
  525.  
  526. ==========================================================================
  527.  
  528. /* COBOL */
  529.  
  530.        IDENTIFICATION DIVISION. 
  531.        PROGRAM-ID. XMASPRINT.
  532.        ENVIRONMENT DIVISION.
  533.        CONFIGURATION SECTION.
  534.        SOURCE-COMPUTER. UNIVAC-1110.
  535.        OBJECT-COMPUTER. UNIVAC-1110.
  536.        DATA DIVISION.
  537.        PROCEDURE DIVISION.  
  538.        0000-MAIN.
  539.            PERFORM 10-PRINT 15 TIMES.
  540.            STOP RUN.
  541.        10-PRINT.  DISPLAY 'Merry Christmas' UPON PRINTER.
  542.  
  543.         From: seismo!decvax!sdcsvax!ittvax!dcdwest!noscvax!kemp
  544.  
  545. ==========================================================================
  546.  
  547. /* Cprolog */
  548.  
  549. /* Write Merry Christmas 15 times in 4.1bsd Cprolog 
  550.  *  To execute, get into prolog, then issue the commands:
  551.  *  |?- ['xmas.p'].
  552.  *  |?- xmas.
  553.  */
  554.  
  555. xmas :- name(Text,"Merry Christmas") , writeline(Text,15).
  556. writeline(_,0).
  557. writeline(Text,N) :- write(Text) , nl , M is N - 1 , writeline(Text,M).
  558.  
  559.         From: seismo!decvax!microsof!ubc-vision!mprvaxa!tbray
  560.                 
  561. ==========================================================================
  562.  
  563. /* dBASEII */
  564.  
  565.     store 0 to number
  566.     do while number < 15
  567.         ? "Merry Christmas"
  568.         store 1+number to number
  569.     enddo
  570.     release number
  571.  
  572.                 From: seismo!philabs!sbcs!BNL!jeffy
  573.                     --Jeff M.
  574.  
  575. ==========================================================================
  576.  
  577. /* dBASE II */
  578.  
  579. SET TALK OFF
  580. STORE 0 TO counter
  581. DO WHILE counter < 15
  582.     @ counter, 0 SAY "Merry Christmas"
  583.     STORE counter + 1 TO counter
  584. ENDDO
  585. RETURN
  586.  
  587.                 From: mike@uokvax.UUCP
  588.  
  589. ==========================================================================
  590.  
  591. /* 'csh' command version */
  592.  
  593. repeat 15 echo Merry Christmas
  594.  
  595.             Original-From:     Bruce Israel <israel@umcp-cs>
  596.  
  597. ==========================================================================
  598. /*  DCL (VAX/VMS shell) */
  599.                 
  600.         $ i = 1
  601.         $ loop:
  602.         $ if i.gt.15 then goto done
  603.         $ write sys$output "Merry Christmas"
  604.         $ i = i + 1
  605.         $ goto loop
  606.         $ done:
  607.         $ exit
  608.                 
  609.         From: David Chase <rbbb@rice>
  610.  
  611. ==========================================================================
  612.                 
  613. /* DCL */
  614. And (as I noticed that Un*x shell scripts were on your list, and in
  615. the interest of equal time) here it is in DCL (Digital Command
  616. Language, a CLI which runs on many DEC machines -- I cut my teeth on
  617. VAX/VMS):
  618.  
  619. $ i = 1
  620. $ loop:
  621. $ write sys$output "Merry Christmas"
  622. $ i = i + 1
  623. $ if i .le. 15 then goto loop
  624. $ exit
  625.  
  626.                 Happy Hacking!
  627.  
  628.                 Russell Finn
  629.                 {decvax, eagle, mit-eddie}!mit-vax!russ
  630.                 RUSS%MIT-VAX@MIT-ML
  631.  
  632. ==========================================================================
  633.  
  634. /* DDL */
  635.  
  636. Here is a Merry Christmas program written in DDL. Yes DDL, the Dungeon
  637. Definition Language from UCLA. I have included a makefile
  638. in case you have never seen this stuff before.
  639.  
  640. *********************** xmas.ddl *************************
  641. VAR count;
  642. (count) = 1;
  643.  
  644. Greetings =    ( WHILE ( $lt @count 15 ) :
  645.         ( $setg count ( $plus 1 @count ))
  646.         ( $say "Merry Christmas\n")
  647.     )
  648.     ($spec 3 0 0 0 0);
  649.  
  650. START = ($sdem Greetings);
  651.  
  652. *********************** makefile *************************
  653.  
  654. xmas:
  655.     /usr/src/games/ddl/ddlcomp tiny < tiny.ddl > ddlcomp.out
  656.  
  657. To run it type the following
  658.  
  659.     `/usr/games/lib/ddlrun xmas'
  660.  
  661.  
  662.                 - Joel
  663.  
  664. ==========================================================================
  665.  
  666. /* ed */
  667.  
  668.     ed - /etc/passwd<<!
  669.     1,15g/./s/.*/Merry Christmas/p
  670.     q
  671.     !
  672.  
  673.         From: seismo!mcvax!steven (Steven Pemberton)
  674.  
  675. ==========================================================================
  676. /* ed  */
  677. (UNIX 'standard' line editor):
  678.  
  679.         a   
  680.         Merry Christmas
  681.         .   
  682.         t.  
  683.         t.  
  684.         t.  
  685.         t.  
  686.         t.  
  687.         t.  
  688.         t.  
  689.         t.  
  690.         t.  
  691.         t.  
  692.         t.  
  693.         t.  
  694.         t.  
  695.         t.  
  696.         t.  
  697.         1,$p
  698.  
  699.                     These languages courtesy of:
  700.                         Pavel Curtis, Cornell
  701.                         Mike Caplinger, Rice
  702.  
  703. ==========================================================================
  704.  
  705. /* Concurrent-Euclid */
  706. ------------------
  707. var xmas :
  708.     module
  709.     include '%IO'
  710.     initially
  711.     imports (var IO)
  712.     begin
  713.         var i : ShortInt := 0
  714.         loop
  715.         IO.PutString ('Merry Christmas$N$E')
  716.         i := i + 1
  717.         exit when i = 15
  718.         end loop
  719.     end
  720. end module {xmas}
  721. ------------------
  722.  
  723. Stephen Perelgut    Computer Systems Research Group    University of Toronto
  724.         Usenet:    {linus, ihnp4, allegra, decvax, floyd}!utcsrgv!perelgut
  725.  
  726. ==========================================================================
  727.  
  728. /* Concurrent Euclid */
  729.  
  730. var MerryChristmas :
  731.     module
  732.  
  733.     include '%IO'
  734.  
  735.     initially
  736.  
  737.     imports (var IO)
  738.     begin
  739.         var i: SignedInt := 15
  740.  
  741.         loop
  742.         IO.PutString('Merry Christmas$N$E')
  743.         i := i - 1
  744.         exit when i = 0
  745.         end loop
  746.     end
  747.  
  748. end module
  749.  
  750.                 From utcsrgv!utai!rayan 
  751.  
  752. ==========================================================================
  753.  
  754. /* EYE */
  755.  
  756. Since you said "the more obscure the better", here is the program written in
  757. EYE, a language which was implemented by Kuck & Associates, Inc. of 
  758. Champaign, Illinois as an implementation language for writing a large piece
  759. of software.
  760.  
  761. program yule_tidings is
  762.  
  763. constant number_of_times_to_print_merry_christmas : integer = 15;
  764.  
  765. begin( yule_tidings )
  766.  
  767.     for i:integer = 1 to number_of_times_to_print_merry_christmas
  768.     loop( print_merry_christmas )
  769.  
  770.         put( 'Merry Christmas' | );
  771.  
  772.         endloop( print_merry_christmas );
  773.  
  774.     end( yule_tidings );
  775.                     Jim Davies
  776.                     {pur-ee parsec}!uiucdcs!uiuccsb!davies
  777.  
  778. ==========================================================================
  779.   
  780. /*  FRED  */
  781. (a text editor)
  782.  
  783. u15 jm Merry Christmas
  784.  
  785.                 From: decvax!watmath!ljdickey
  786.  
  787. ==========================================================================
  788.  
  789. /* Forth */
  790.  
  791. (Forth)
  792. 15 0 DO ."Merry Christmas" CR LOOP
  793.  
  794.                     Adam Reed
  795.                     AT&T Information Systems
  796.                     ihnp4!hogpc!pegasus!lzmi!adam
  797.  
  798. ==========================================================================
  799.  
  800. /* Forth */
  801.  
  802. : greetings cr 0 do ." Merry Christmas" cr loop ;
  803.  
  804. 15 greetings
  805.  
  806.  
  807.                 Dave Seaman
  808.                 ..!pur-ee!pucc-k:ags
  809.  
  810. ==========================================================================
  811.  
  812. /* Fortran? */
  813.  
  814. If you want an obscure solution, try the following Fortran
  815. on a VAX.  It works on BSD4.1, BSD4.1c and System V.
  816.  
  817.     integer table(12)
  818.     data table/248514560, -552542885, 4847, -83763968
  819.      1, 323331, 1542717440, 1260, 1292108988
  820.      2, 2037543525, 1919435552, 1836348265, 684897/
  821.     call out(table)
  822.     end
  823.  
  824.     subroutine out(code)
  825.     external code
  826.     call code
  827.     return
  828.     end
  829. -- 
  830.  
  831. Griff Smith    AT&T Bell Laboratories, Murray Hill
  832. Phone:        (201) 582-7736
  833. Internet:    ggs@ulysses.uucp
  834. UUCP:        ulysses!ggs
  835.  
  836. ==========================================================================
  837.  
  838. /* Fortran 77 */
  839.  
  840.       program yule
  841.       parameter (nwish = 15)
  842. c
  843.       do 1 i = 1,nwish
  844.     1   print*,'Merry Christmas'
  845. c
  846.       end
  847.                     Jim Davies
  848.                     {pur-ee parsec}!uiucdcs!uiuccsb!davies
  849.  
  850. ==========================================================================
  851.  
  852. /* FP */
  853. (Backus' Functional Programming Language):
  854. (Using the syntax of Scott Baden's UNIX implementation)
  855.  
  856.         ; MC prints the string 'Merry Christmas' 15 times when applied
  857.         ;                       to any argument and returns T.
  858.         {MC     %T @ out @ &%"Merry Christmas\n" @ iota @ %15}
  859.  
  860.                     These languages courtesy of:
  861.                         Pavel Curtis, Cornell
  862.                         Mike Caplinger, Rice
  863.  
  864. ==========================================================================
  865.  
  866. /* GPSS */ 
  867.  
  868.     SIMULATE
  869.     GENERATE    1
  870.     TERMINATE    1
  871.     START        15,,1
  872.     REPORT
  873.     TEXT        MERRY CHRISTMAS
  874.     END
  875.  
  876.             ---From some unknown person on the other side of uucp 
  877.  
  878. ==========================================================================
  879.  
  880. /* IBM 370 assembly */
  881.  
  882. How about this one (IBM 370 assembler running VM/VPS - a local hack at Boston
  883. University):
  884.  
  885. xmas      csect
  886.           stm     r14,r12,12(r13)
  887.           lr      r12,r15
  888.           using   xmas,r12
  889.           st      r13,savearea+4
  890.           la      r13,savearea
  891.  
  892. *
  893. *         Initialize counter
  894. *
  895.  
  896. xmasloop  ds      0h
  897.           la      r2,15                   Print it 15 times
  898.           qio     rb=xmasrb               Print "Merry Christmas"
  899.           bct     r2,xmasloop
  900.  
  901.           l       r13,4(,r13)             Restore registers
  902.           lm      r14,r12,12(r13)
  903.           br      r14                     Return to OS
  904.  
  905. xmasrb    qiorb   ddname=sysprint,bufad=xmasmsg,lrecl=l'xmasmsg
  906. xmasmsg   dc      c' Merry Christmas'     Don't forget carriage control
  907.           end     xmas
  908.  
  909.  
  910. If that isn't obscure, I don't know what is.
  911.  
  912.             ---Sender: reg@ima!vaxine.UUCP
  913.  
  914. ==========================================================================
  915.  
  916. /* Icon */
  917.  
  918.     # write "Merry Christmas" 15 times on standard output
  919.     procedure main()
  920.         every 1 to 15 do write("Merry Christmas")
  921.     end
  922.  
  923. "1 to 15" is a generator which produces the sequence 1..15;
  924. "every X do Y" evaluates Y for each value of X;
  925. write() writes a line of text.
  926.  
  927.                     Randy Hudson
  928.                     decvax!cca!ima!inmet!rgh
  929.  
  930. ==========================================================================
  931.  
  932. /* Icon (Version 5) */
  933.  
  934. procedure main()
  935.     every write(|"Merry Christmas") \ 15
  936. end
  937.  
  938. The more canonical solution is:
  939.  
  940. procedure main()
  941.     every 1 to 15 do
  942.         write("Merry Christmas")
  943. end
  944.  
  945. but obviously isn't as devious.
  946.  
  947.                     ---Bill Mitchell
  948.  
  949. ==========================================================================
  950.  
  951. /* Imp80 */
  952.  
  953. %begin
  954.     %integer index
  955.  
  956.     %for index = 1, 1, 15 %cycle
  957.         Print String("Merry Christmas")
  958.         New Line
  959.     %repeat
  960. %end %of %program
  961.  
  962.                 From: jd@ukc.UUCP
  963.         Organization: Computing Lab. Kent University, England
  964.  
  965. ==========================================================================
  966.  
  967. /* The Kent Recursive Calculator */
  968.  
  969.     there you are, here is the merry christmas program in my favourite 
  970.     language, krc (The Kent Recursive Calculator),
  971.     a teaching and research applicative language used at the University of
  972.     Kent, Canterbury, UK.
  973.     the syntax is annexed and requests for the full formal description
  974.     of the language (syntax+semantics) will be considered.
  975.     the program is:
  976.  
  977.     print 0 = []
  978.     print n = "Merry Christmas":nl:print (n-1)
  979.  
  980.     and the command to run it (in the interpreter) is
  981.  
  982.     print 15!
  983.  
  984.     silvio lemos meira
  985.     computing lab
  986.     university of kent at canterbury
  987.     ...vax135!ukc!srlm
  988.  
  989.     SYNTAX...
  990.  
  991. (note: space is limited, but the syntax is available upon request;
  992.     just send me a stamped, self-addressed antelope -- Don Davis)
  993.  
  994. ==========================================================================
  995.  
  996. /* LISP */
  997.  
  998.    (do ((i 0 (add1 i)))
  999.        ((eq i 15))
  1000.        (msg "Merry Christmas" N))
  1001.  
  1002.  
  1003.                 Dave Seaman
  1004.                 ..!pur-ee!pucc-k:ags
  1005.  
  1006. ==========================================================================
  1007.  
  1008. /* Scheme or Maclisp or Franz Lisp */
  1009. ;
  1010. (do ((i 0 (+ i 1)))
  1011.     ((= i 15))
  1012.     (princ "Merry Christmas")
  1013.     (terpri)   ;new line
  1014. )
  1015.  
  1016.                   --  chip elliott     ...decvax!dartvax!chip
  1017.  
  1018. ==========================================================================
  1019.  
  1020. /* MTS Lisp */
  1021.  
  1022.   (repeat '( print '"Merry Christmas") 15)    # MTS Lisp.
  1023.                  Bruce Wilcox, Intermetrics Inc.
  1024.  
  1025. ==========================================================================
  1026.  
  1027. /* LSRHS Logo */
  1028. (from the Usenix82 tape):
  1029.  
  1030. to greet :n
  1031. 10  if :n >1 then greet (:n - 1)
  1032. 20  print [Merry Christmas]
  1033. end
  1034. greet 15
  1035.  
  1036.         From: seismo!decvax!trw-unix!trwspp!urban (Mike Urban)
  1037.  
  1038. ==========================================================================
  1039.  
  1040. /* Logo */
  1041.  
  1042.         repeat 15 [print "Merry\ Christmas]
  1043.  
  1044.                     These languages courtesy of:
  1045.                         Pavel Curtis, Cornell
  1046.                         Mike Caplinger, Rice
  1047.  
  1048. ==========================================================================
  1049.  
  1050. /* LSE */
  1051.  
  1052. Here's a language you probably have never heard of... LSE (Langue
  1053. Symbolique d'Instruction, or Symbolic Language of Instruction).  I
  1054. used it on some ancient machine in France (of French make) and it is
  1055. roughly parallel to BASIC translated to French.  It sure isn't my
  1056. favorite, but it's interesting...
  1057.  
  1058. 10 pour i = 1 jusqua 15 faire 20
  1059. 20 afficher "Merry Christmas"
  1060.  
  1061.  
  1062.                 Philippe Lacroute
  1063.                 ..decvax!sun!cochon
  1064.  
  1065. ==========================================================================
  1066.  
  1067. /* m4 */
  1068.  
  1069. define(`merry',`ifelse(eval($1),eval(0),,Merry Christmas
  1070. `merry'(eval($1-1)))')dnl
  1071. merry(15)dnl
  1072.  
  1073.  
  1074.  
  1075.                     Joseph L. Wood, III
  1076.                     AT&T Information Systems
  1077.                     Laboratories, Holmdel
  1078.                     (201) 834-3759
  1079.                     ariel!jlw
  1080.  
  1081. ==========================================================================
  1082.  
  1083. /* MACSYMA */
  1084.  
  1085.         doit() := for i:1 thru 15 do print("Merry Christmas")$
  1086.  
  1087.                     These languages courtesy of:
  1088.                         Pavel Curtis, Cornell
  1089.                         Mike Caplinger, Rice
  1090.  
  1091. ==========================================================================
  1092.  
  1093. /* make */
  1094.  
  1095. If you use the following as the description file for 'make', it
  1096. will satisfy your requirement.  Make can be considered a language
  1097. interpreter, so what the heck.
  1098.  
  1099. ---------------------- cut ------- here -----------------------------------
  1100. .SILENT:
  1101.  
  1102. foo_._bar_ :                    # some name unlikely to already exist
  1103.     echo merry christmas
  1104.     echo merry christmas
  1105.     echo merry christmas
  1106.     echo merry christmas
  1107.     echo merry christmas
  1108.     echo merry christmas
  1109.     echo merry christmas
  1110.     echo merry christmas
  1111.     echo merry christmas
  1112.     echo merry christmas
  1113.     echo merry christmas
  1114.     echo merry christmas
  1115.     echo merry christmas
  1116.     echo merry christmas
  1117.     echo merry christmas
  1118.  
  1119.             ---From some unknown person on the other side of uucp 
  1120.  
  1121. ==========================================================================
  1122.  
  1123. /* A Maryland Text Editor procedure */
  1124. ---------------------------------
  1125. let a=0 
  1126. next:test a<15  
  1127. escape  
  1128. dis 'Merry Christmas'
  1129. let a=a+1
  1130. jump next
  1131.  
  1132. From: seismo!decvax!sdcsvax!ittvax!dcdwest!noscvax!kemp
  1133.  
  1134. ==========================================================================
  1135.  
  1136. /* Mesa 5.0 */
  1137.  
  1138. -- Here it is in Mesa 5.0; good luck trying to find an Alto or a D-machine
  1139. -- on which to run it.
  1140.  
  1141. DIRECTORY
  1142.         IODefs: FROM "iodefs" USING [WriteLine];
  1143.  
  1144. MerryChristmas: PROGRAM IMPORTS IODefs =
  1145.  
  1146.         BEGIN
  1147.         i: INTEGER; -- loop index
  1148.         FOR i IN [0..15) DO -- print the message 15 times
  1149.                 WriteLine["Merry Christmas"]; -- this is the message, and the
  1150.                                               -- procedure WriteLine[] provides
  1151.                                               -- the carriage return
  1152.                 ENDLOOP; -- go back and do it again
  1153.  
  1154.         END. -- all done
  1155.  
  1156.                 -- Patrick Olmstead
  1157.  
  1158.                 -- ...ucbvax!menlo70!sytek!olmstead
  1159.                 -- ...decvax!sytek!olmstead (when decvax answers the phone)
  1160.  
  1161. ==========================================================================
  1162.  
  1163. /* MIX */
  1164.  
  1165. *
  1166. *  THIS PROGRAM WILL PRINT "MERRY CHRISTMAS" 15 TIMES 
  1167. *
  1168. LP         EQU  18        CARD PUNCH DEVICE
  1169. *
  1170. MSG        ALF   MERR        DON'T FORGET THE BLANK SPACE FOR CCTL
  1171.            ALF  Y CHR
  1172.            ALF  ISTMA
  1173.            ALF  S
  1174.            ORIG *+20
  1175. *
  1176. START      EQU  *
  1177.            ENT1 0        INITIALIZE COUNTER
  1178. *
  1179. LOOP       EQU  *
  1180.            OUT  MSG(LP)        WRITE IT OUT
  1181.            JBUS *(LP)        WAIT ON I/O
  1182.            INC1 1        R1 := R1 + 1
  1183.            CMP1 =15=        IF (R1 = 15)
  1184.            JE   DONE           THEN DONE
  1185.            JMP  LOOP           ELSE DO IT AGAIN
  1186. *
  1187. DONE       EQU  *
  1188.            HLT            AND A HAPPY NEW YEAR
  1189.            END  START
  1190.  
  1191.  
  1192. -- 
  1193. Theodore Hope
  1194. School of ICS, Georgia Tech, Atlanta GA
  1195. CSNet:    Hope @ GaTech        ARPA:    Hope.GaTech @ CSNet-Relay
  1196. uucp:    ...!{akgua,allegra,rlgvax,sb1,unmvax,ut-ngp,ut-sally}!gatech!Hope
  1197.  
  1198. ==========================================================================
  1199.  
  1200. /* MLisp */
  1201. (Gosling's Emacs editor extension language):
  1202.  
  1203.         (provide-prefix-argument 15 (insert-string "Merry Christmas\n"))
  1204.  
  1205.                     These languages courtesy of:
  1206.                         Pavel Curtis, Cornell
  1207.                         Mike Caplinger, Rice
  1208.  
  1209. ==========================================================================
  1210.  
  1211. /* Modula-2 */
  1212.  
  1213. Module cheers;
  1214. ODULEcheers;
  1215. FROM InOut IMPORT WriteLn, WriteString;
  1216. VAR
  1217.   i    :CARDINAL;
  1218. BEGIN
  1219.   FOR i := 1 TO 15 DO
  1220.     WriteString('Merry Christmas');
  1221.     WriteLn;
  1222.   END;    (*FOR I*)
  1223. END cheers.
  1224.  
  1225.             From: seismo!decvax!decwrl!amd70!fortune!dsd!mush
  1226.  
  1227. ==========================================================================
  1228.  
  1229. /* MTS editor */
  1230.  
  1231. * And here is a weird one written in the MTS editor
  1232. * the @verify@-lnum says to print the new line without linenumber
  1233. * '*' refers the current line number.
  1234. *
  1235.  
  1236. insert "merry christmas" @verify@-lnum
  1237. copy * to * copies=14 @verify@-lnum
  1238.  
  1239.             ---From: seismo!cmcl2!floyd!ihnp4!alberta!stephen
  1240.  
  1241. ==========================================================================
  1242.  
  1243. /* Mystery Language */
  1244. (Author did not include name and I don't recognize it)
  1245.  
  1246. MODULE Greetings;
  1247. FROM Terminal IMPORT WriteString, WriteLn;
  1248.  
  1249. VAR i: CARDINAL;
  1250.  
  1251. BEGIN
  1252.   FOR i:=1 TO 15 DO
  1253.     WriteString("Merry Christmas");
  1254.     WriteLn;
  1255.   END; (*for*)
  1256. END Greetings.
  1257.  
  1258.         From: seismo!decvax!decwrl!amd70!dual!proper!opje
  1259.  
  1260. ==========================================================================
  1261.  
  1262. /* Newspeak */
  1263.  
  1264. (defproc merry-xmas () (values)
  1265.     (do ((i 1 (1+ i)))
  1266.         (print "Merry Christmas")
  1267.         (exit-do-if (= i 15))))
  1268.      
  1269.         From: John Foderaro (on an h19-u) <ucbvax!ucbkim:jkf>
  1270.  
  1271. ==========================================================================
  1272.  
  1273. /* nroff */
  1274.  
  1275. .nr i 15+1 1
  1276. .de MC
  1277. .if \\n-i \{ .tl ''Merry Christmas''
  1278. .    MC \}
  1279. ..
  1280. .MC
  1281.  
  1282.  
  1283.             R. Drew Davis  pyuxbb!drew
  1284.  
  1285. ==========================================================================
  1286.  
  1287. /* OOPC */
  1288. (an object-oriented preprocessor for C):
  1289.  
  1290. main()
  1291. {
  1292.     int i;
  1293.  
  1294.     for (i=0; i<15; i++)
  1295.         printf("Merry Christmas\n");
  1296. }
  1297.  
  1298. If it looks a lot like C, that's because it is.  The object-oriented features
  1299. are only used when you're dealing with objects (you can use C wherever
  1300. you want).
  1301.  
  1302.  
  1303.     Karl Freburger
  1304.     decvax!ittvax!freb
  1305.  
  1306. ==========================================================================
  1307.  
  1308. /* OPS5 */
  1309.  
  1310. ; A program to print Merry Christmas 15 times, in OPS5.
  1311. ; OPS5 is a simple AI/expert systems language for writing
  1312. ; production systems in.
  1313. (literalize counter value)    ; Analogous to a record declaration.
  1314.                 ; The program:    A single production.
  1315. (p print-one-merry-christmas            ; if
  1316.     (counter ^value {<c> > 0})        ;    counter.value > 0
  1317.     -->                    ; then
  1318.     (write (crlf) Merry Christmas)        ;      write("Merry christmas");
  1319.     (modify 1 ^value (compute <c> - 1)))    ;      counter.value -:= 1;
  1320. (make counter ^value 15)             ; Create a counter with value=15
  1321. (watch 0)                      ; No tracing.
  1322. (run)                        ; Go for it.
  1323.  
  1324. ;                                Ben Hyde, Intermetrics Inc.
  1325.  
  1326. ==========================================================================
  1327.  
  1328. /* Pascal */
  1329.  
  1330. program yuletidings (output);
  1331. const
  1332.     numberofwishes = 15;
  1333. var
  1334.     i : integer;
  1335.  
  1336. begin
  1337.     for i := 1 to numberofwishes do
  1338.         writeln('Merry Christmas');
  1339.     end.
  1340.                     Jim Davies
  1341.                     {pur-ee parsec}!uiucdcs!uiuccsb!davies
  1342.  
  1343. ==========================================================================
  1344.  
  1345. /* PDP-11 assembler */
  1346. (under RT-11)
  1347.  
  1348.     .TITLE    MERRY XMAS
  1349.     .IDENT    /R M/
  1350.     .NLIST    BEX
  1351.     .DSABL    GBL
  1352.     .ENABL    LC
  1353.  
  1354.  
  1355.  
  1356.     .MACLL    .PRINT, .EXIT
  1357.  
  1358.  
  1359.  
  1360. MERRY::
  1361.     MOV    #15.,R4            ;set up the print count
  1362.     .PRINT    #MSG1            ;print the message
  1363.     SOB    R4,MERRY        ;loop until finished
  1364.  
  1365.     .EXIT                ;return to RT-11
  1366.  
  1367. MSG1:    .ASCIZ    /Merry Christmas !!!/
  1368.     .EVEN
  1369.  
  1370.     .END    MERRY
  1371.  
  1372.                 From: seismo!utah-cs!pwa-b!miorelli
  1373.  
  1374. ==========================================================================
  1375.  
  1376. /* PDP-11 assembler */
  1377. (under UNIX)
  1378.  
  1379.         mov    $15.,r4
  1380.     1:
  1381.         mov    $1,r0
  1382.         sys    write; 2f; 3f-2f
  1383.         bcs    1f
  1384.         sob    r4,1b
  1385.         clr    r0
  1386.     1:
  1387.         sys    exit
  1388.     .data
  1389.     2:    <Merry Christmas\n\0>
  1390.     3:
  1391.  
  1392. Jim McKie    Mathematisch Centrum, Amsterdam        ....mcvax!jim
  1393.  
  1394. ==========================================================================
  1395.  
  1396. /*  PL/I  version.  ANS PL/I, subset G.   */
  1397.  
  1398. merry: proc options(main);
  1399.  
  1400. dcl i fixed binary;
  1401.  
  1402. do i = 1 to 15;
  1403.  
  1404.      put skip edit('Merry Christmas') (a);
  1405.  
  1406. end;
  1407.  
  1408. end merry;
  1409.  
  1410.                  --  chip elliott     ...decvax!dartvax!chip
  1411.  
  1412. ==========================================================================
  1413.  
  1414. /* PL/1 */
  1415.  
  1416. START: PROC OPTIONS(MAIN);
  1417. DCL I FIXED BINARY(15);  /* LONG FORM; SAME AS DCL I; */
  1418. DO I = 1 TO 15;
  1419.     PUT EDIT ("Merry Christmas");
  1420. END;
  1421. END START;
  1422.                                                         julie    
  1423.                 seismo!philabs!jah
  1424.  
  1425. ==========================================================================
  1426.  
  1427. /* PL/1 */
  1428.  
  1429. yule: proc options(main);
  1430.  
  1431. %numwish = '15';
  1432.  
  1433. do i = 1,numwish;
  1434.    put skip list('Merry Christmas');
  1435.    end;
  1436.  
  1437. end yule;
  1438.  
  1439.                     Jim Davies
  1440.                     {pur-ee parsec}!uiucdcs!uiuccsb!davies
  1441.  
  1442. ==========================================================================
  1443.  
  1444. /* Pr1me assembly */
  1445.  
  1446.          SEG
  1447.          RLIT
  1448.          SUBR   PRINT
  1449.  
  1450.          LINK
  1451. PRINT    ECB    START
  1452.  
  1453.          DYNM   COUNT
  1454.          PROC
  1455.  
  1456.  
  1457. START    LDA    =15
  1458.          STA    COUNT
  1459.  
  1460. START1   LDA    COUNT
  1461.          BEQ    DONE
  1462.          S1A
  1463.          STA    COUNT
  1464.  
  1465.          CALL   TNOU
  1466.          AP     =C'Merry Christmas',S
  1467.          AP     =15,SL
  1468.  
  1469.          JMP    START1
  1470.  
  1471. DONE     PRTN
  1472.          END
  1473.  
  1474.  
  1475. Jeff Lee
  1476. CSNet:    Jeff @ GATech        ARPA:    Jeff.GATech @ CSNet-Relay
  1477. uucp:    ...!{sb1,allegra,ut-ngp}!gatech!jeff ...!duke!mcnc!msdc!gatech!jeff
  1478.  
  1479. ==========================================================================
  1480.  
  1481. /* Prolog */
  1482.  
  1483.     hello(0) :- !.
  1484.     hello(N) :- M is N - 1, print("Merry Christmas"), hello(M), !.
  1485.     hello(15)!
  1486.  
  1487. (I'm just learning prolog, so my apologies if the style is wrong.)
  1488.  
  1489.                             Aloke Prabhakar
  1490.                             prabhaka@BERKELEY
  1491.                             ucbvax!prabhaka
  1492.  
  1493. ==========================================================================
  1494.  
  1495. /* Prolog */ 
  1496.  
  1497. wmc:- countmc(15).
  1498. countmc(0).
  1499. countmc(Count):- write('Merry Christmas'), nl, Ncnt is Count-1, countmc(Ncnt).
  1500.  
  1501.  
  1502.                     --Peter Borgwardt, U. of Minnesota
  1503.                       borgward.umn-cs@rand-relay
  1504.  
  1505. ==========================================================================
  1506.  
  1507. /* REVE */
  1508. (Equational-programming/term-rewriting system):
  1509.  
  1510. (Has no I/O.  This will look like
  1511.             merry_christmas(merry_christmas(...))
  1512. Also, to avoid having to specify 15 as the fifteenth successor of zero,
  1513. we define addition and multiplication.)
  1514.  
  1515.         (x + 0)     == x
  1516.         (x + s(y))  == (s(x) + y)
  1517.         (x * 0)     == 0
  1518.         (x * s(y))  == (x + (x * y))
  1519.         mc(s(0))    == merry_christmas
  1520.         mc(s(s(x))) == merry_christmas(mc(s(x)))
  1521.         
  1522.         mc( (s(s(s(0))) * s(s(s(s(s(0)))))) )
  1523.  
  1524.                     These languages courtesy of:
  1525.                         Pavel Curtis, Cornell
  1526.                         Mike Caplinger, Rice
  1527.  
  1528. ==========================================================================
  1529.  
  1530. /* *roff */
  1531.  
  1532. Well, the most natural choice for Merry Christmas is of course:
  1533.     V/N/T/DIT/roff.
  1534.  
  1535. This will print it on the standard output, It will give you an extra blank line,
  1536. sorry about that.
  1537.  
  1538.     .fp 1 MC
  1539.     .pl 1
  1540.     .nf
  1541.     .nr l 0 +1
  1542.     .de mm
  1543.     .if \\n+l=15 .rm mm
  1544.     Merry Christmas
  1545.     .mm
  1546.     ..
  1547.     .mm
  1548.  
  1549. The font MC is of course your local ``Merry Christmas font''; all the characters
  1550. are built from christmas trees.
  1551. If you don't want the extra newline you can use the error output:
  1552.  
  1553.     .de mm
  1554.     .if \\nk=14 .ab Merry Christmas
  1555.     .nr k +1
  1556.     .tm Merry Christmas
  1557.     .mm
  1558.     ..
  1559.     .mm
  1560.  
  1561. Of course, you loose the nice look of the MC font.
  1562.  
  1563. There are of course about a dozen other ways to use troff for this.
  1564.  
  1565.                 -- jaap akkerhuis (mcvax!jaap)
  1566.  
  1567. ==========================================================================
  1568.  
  1569. /* QC */
  1570.  
  1571. /*
  1572.  * This program is written in the language QC (quick & clean), a
  1573.  * descendant of QD (quick & dirty). Both languages were written by 
  1574.  * Chris Grey for 370/ systems runing MTS (a user-friendly operating
  1575.  * system).
  1576.  */
  1577. proc main():
  1578. int I;
  1579. extern printf;
  1580.   for I from 1 upto 15 do
  1581.         printf("Merry Christmas")
  1582.   od
  1583. corp
  1584.             ---From: seismo!cmcl2!floyd!ihnp4!alberta!stephen
  1585.  
  1586. ==========================================================================
  1587.  
  1588. /* sed script */
  1589.  
  1590. echo 'Mery Chistma' |
  1591. sed '
  1592.     s/\(..\)\(.\)\(....\)\(.\)\(.\)\(...\)/\1\2\2\3\2\4\5\6\5/
  1593.     h;G;G
  1594.     s/$/\
  1595. /
  1596.     s/.*/&&&&&/
  1597. '
  1598.             From: seismo!decvax!ucbvax!reed!phillips
  1599.  
  1600. ==========================================================================
  1601.  
  1602. /* SETL */
  1603. (Doesn't use any of the interesting features of the language):
  1604.  
  1605.         definef main();
  1606.             (1 <= forall i <= 15) print('Merry Christmas');
  1607.         end main;.
  1608.  
  1609.                     These languages courtesy of:
  1610.                         Pavel Curtis, Cornell
  1611.                         Mike Caplinger, Rice
  1612.  
  1613. ==========================================================================
  1614.  
  1615. /* XEROX sigma-7 assembler */
  1616. (running under CP-V)
  1617.  
  1618.     SYSTEM SIG7
  1619.     SYSTEM BPM
  1620.     REF M:LO
  1621. BUFR    TEXT 'MERRY CHRISTMAS'
  1622. START    LI,4 15
  1623.     M:WRITE M:LO,(BUF,BUFR),(SIZE,15)
  1624.     BDR,4 START+1
  1625.     M:EXIT
  1626.     END START
  1627.  
  1628. or, you can avoid loading the BPM macro's by doing your own FPT
  1629.  
  1630.     SYSTEM SIG7
  1631.     REF M:LO
  1632. BUFR    TEXT 'MERRY CHRISTMAS'
  1633. FPT    GEN,8,24 X'11',M:LO
  1634.     GEN,4,28 3,X'10'
  1635.     DATA BUFR
  1636.     DATA 15
  1637. START    LI,4 15
  1638.     CAL1,1 FPT
  1639.     BDR,4 START
  1640.     CAL1,9 1
  1641.     END START
  1642.  
  1643.                     Bob McQueer
  1644.                     druxt!mcq
  1645.  
  1646. ==========================================================================
  1647.  
  1648. /* Smalltalk-80 */
  1649.  
  1650.     output <- WriteStream on: (String new: 10).
  1651.     1 to 15 do: [
  1652.         output nextPutAll: 'Merry Christmas'.
  1653.         output cr
  1654.     ].
  1655.     output contents.
  1656.  
  1657. Select this from the screen and hit 'printIt', and out comes the message.
  1658.  
  1659.             From: seismo!decvax!ittvax!freb
  1660.  
  1661. ==========================================================================
  1662.  
  1663. /* Smalltalk-80 */
  1664.  
  1665.         merryChristmas: aStream
  1666.             "Prints 'Merry Christmas' on aStream 15 times."
  1667.             
  1668.             15 timesRepeat:
  1669.                 [aStream
  1670.                     nextPutAll: 'Merry Christmas';
  1671.                     cr
  1672.                 ]
  1673.                     These languages courtesy of:
  1674.                         Pavel Curtis, Cornell
  1675.                         Mike Caplinger, Rice
  1676.  
  1677. ==========================================================================
  1678.  
  1679. /* Snobol-3 */
  1680. (Snobol-4??  What's that?  We use Snobol-3 here.)
  1681.  
  1682. * S.D.S. TSS SNOBOL-3
  1683.           N = 1
  1684. LOOP      LOUT = 'MERRY CHRISTMAS'
  1685.           N = .LT(N,15) N + 1                        /S(LOOP)F(.EXIT)
  1686.  
  1687.             From: seismo!rochester!rocksvax!sunybcs!colonel
  1688.  
  1689. ==========================================================================
  1690.  
  1691. /* Snobol 4 */
  1692.  
  1693. * Snobol 4 version.  Not very elegant!
  1694. *
  1695. i = 1
  1696.  
  1697. a: output = 'Merry Christmas'
  1698.    i = i + 1
  1699.    le(i,15)    :s(a)
  1700.  
  1701.                   --  chip elliott     ...decvax!dartvax!chip
  1702.  
  1703. ==========================================================================
  1704.  
  1705. /* SPEED editor */
  1706.  
  1707. To print Merry Christmas 15 times using the SPEED editor from Data General
  1708. (SPEED is a TECO-like editor, $ will represent an escape character, ^D will
  1709. represent a control-D):
  1710.  
  1711. 15<iMerry Christmas
  1712. $>$#t$#k$h^D
  1713.                 Michael Meissner
  1714.                 Data General Corporation
  1715.                 ...{allegra, decvax!ittvax, rocky2}!datagen!mrm
  1716.  
  1717. ==========================================================================
  1718.  
  1719. /* SPL/3000 */
  1720.  
  1721. $Control Uslinit
  1722. Begin
  1723.  
  1724. Byte Array
  1725.    Msg (0:14) := "Merry Christmas";
  1726.  
  1727. Integer
  1728.    I;
  1729.  
  1730. Intrinsic
  1731.    Print, Terminate;
  1732.  
  1733. For I := 1 UNTIL 15 Do
  1734.    Print (Msg, -15, 0);        << 15 bytes, no CCTL >>
  1735.  
  1736. Terminate;
  1737.  
  1738. End.
  1739.  
  1740. From: seismo!harpo!ihnp4!clyde!akgua!emory!gatech!hope
  1741.  
  1742. ==========================================================================
  1743.  
  1744. /* Stage 2 */
  1745.  
  1746. #$#$0 (+-*/)
  1747. END#
  1748. $F0#
  1749. #
  1750. $#
  1751. $10$F7#
  1752. Merry Christmas$F15#
  1753. $F8#
  1754. ##
  1755. 15
  1756. END
  1757.  
  1758.             ---Written and Contributed by Tom Almy, Tektronix, Inc.
  1759.  
  1760. ==========================================================================
  1761.  
  1762. /* Stoic */
  1763. 15 0 DO "Merry Christmas&15&" MSG LOOP
  1764.  
  1765.             ---Written and Contributed by Tom Almy, Tektronix, Inc.
  1766.  
  1767. ==========================================================================
  1768.  
  1769. /* TECO */
  1770.  
  1771. 15<^AMerry Christmas
  1772. ^A>$$
  1773.  
  1774. (where '$' is an Escape, and ^A is a control-A)
  1775.  
  1776.         ---Written and Contributed by Tom Almy, Tektronix, Inc.
  1777.  
  1778. =======================================
  1779.  
  1780. /* TECO */
  1781. (Text Editor COrrector)
  1782.  
  1783. 15<^AMerry Christmas
  1784. ^A>$$
  1785.  
  1786. note: ^A is a Control A
  1787.       $ is an escape character
  1788.  
  1789. And a Happy New Year,
  1790.  
  1791.  
  1792.                 Rob Spray
  1793.  
  1794.                 Software Designer
  1795.  
  1796.                 US Mail:  Computer*Thought Corporation
  1797.                       1721 West Plano Parkway, Suite 125
  1798.                       Plano TX 75075
  1799.                 BellTel:  214-424-3511
  1800.                 ARPAnet:  ROB.CT@RAND-RELAY
  1801.                 uucp:     ... decvax!cornell!ctvax!rob
  1802.  
  1803. ==========================================================================
  1804.     
  1805. /* TECO */
  1806.  
  1807.     :IGMerry Christmas
  1808. $                !* Put string in Q-register G !
  1809.     15<:GG>$$        !* 15 Times, print it out !
  1810.  
  1811. The dollar signs represent ESCapes.
  1812.  
  1813.                 Merry Christmas!
  1814.                     David Kaufman
  1815.                     ...decvax!yale-comix!kaufman
  1816.     
  1817.  
  1818. ==========================================================================
  1819.  
  1820. /* TeX */
  1821. (Knuth's text formatting language, assuming presence of Plain.TeX macros):
  1822.  
  1823.         \def\mc#1{\ifnum #1>0 Merry Christmas\par
  1824.                   {\count0=#1\advance\count0 by-1\mc\count0}\fi}
  1825.         \mc{15}
  1826.  
  1827.                     These languages courtesy of:
  1828.                         Pavel Curtis, Cornell
  1829.                         Mike Caplinger, Rice
  1830.  
  1831. ==========================================================================
  1832.  
  1833. /* TRAC */
  1834.  
  1835. #(ds,Merry-Christmas,(#(eq,arg,0,,(#(PS,Merry Christmas(
  1836. ))#(Merry-Christmas,#(su,arg,1))))))'
  1837. #(ss,Merry-Christmas,arg)'
  1838. #(Merry-Christmas,15)'
  1839.  
  1840. Note: "TRAC" is a trademark of Rockford Research, Inc.
  1841.         ---Written and Contributed by Tom Almy, Tektronix, Inc.
  1842.  
  1843. ==========================================================================
  1844.  
  1845. /* TRAC */
  1846.  
  1847.         #(ds,merry,(#(eq,count,0,,((Merry Christmas
  1848.         )#(cl,merry,#(su,count,1))))))'
  1849.  
  1850.         #(ss,merry,count)'
  1851.  
  1852.         #(cl,merry,15)'
  1853.  
  1854. The TRAC language is a text- and macro-processing language reminiscent
  1855. of LISP.  The first command defines a function, the second marks "count"
  1856. as a dummy argument, the third calls the function.  The printing is done
  1857. by the command interpreter.
  1858.  
  1859.                    Andy Behrens
  1860.                    decvax!dartvax!andyb
  1861.  
  1862. ==========================================================================
  1863.  
  1864. /* TROFF */
  1865.  
  1866.         .de MC
  1867.         .nf
  1868.         .if \\$1>0 \{\
  1869.         Merry Christmas
  1870.         .nr x \\$1
  1871.         .nr x -1
  1872.         .MC \\nx \}
  1873.         ..
  1874.         .MC 15
  1875.  
  1876.                     These languages courtesy of:
  1877.                         Pavel Curtis, Cornell
  1878.                         Mike Caplinger, Rice
  1879.  
  1880. ==========================================================================
  1881.  
  1882. /* Turing */
  1883.  
  1884. ------
  1885. for : 1 .. 15
  1886.     put "Merry Christmas"
  1887. end for
  1888. ------
  1889.  
  1890. Stephen Perelgut    Computer Systems Research Group    University of Toronto
  1891.         Usenet:    {linus, ihnp4, allegra, decvax, floyd}!utcsrgv!perelgut
  1892.  
  1893. ==========================================================================
  1894.  
  1895. /* UL */
  1896.  
  1897. Here's one you probably wouldn't expect to get. It is Model204 User Language
  1898. (UL is a query/programming language for the M204 database system that
  1899. runs on IBM mainframes).
  1900.  
  1901. BEGIN
  1902. %A IF FIXED DP 0
  1903. 1. FOR %A FROM 1 TO 15
  1904.    PRINT 'MERRY CHRISTMAS'
  1905. 2. END
  1906.  
  1907. That's it!
  1908.                 Mickey Levine
  1909.                 decvax!cca!mickey
  1910.  
  1911. ==========================================================================
  1912.  
  1913. /* UNIX shell script */
  1914.  
  1915. echo "Merry Christmas" | sed -e 's/./Merry Christmas%/g' | tr % '\012'
  1916.  
  1917.                          Ben Hyde Intermetrics Inc.
  1918.  
  1919. ==========================================================================
  1920.  
  1921. /* Unix shell script (Bourne) */
  1922.  
  1923. COUNT=0
  1924. while test $COUNT -lt 15
  1925. do
  1926.     echo "Merry Christmas."
  1927.     COUNT=`expr $COUNT + 1`
  1928. done
  1929.  
  1930.             Ta!
  1931.  
  1932.             Dave Ihnat
  1933.             ihuxx!ignatz
  1934.  
  1935. ==========================================================================
  1936.  
  1937. /* VALGOL */
  1938.  
  1939. I didn't look closely, but I didn't see a submission in VALGOL.  Here is an
  1940. attempt, but I can't vouch for its correctness, since I don't know any valley
  1941. girls.  After all, I live in Washington, not California, and we're a little
  1942. behind the times up here.
  1943.  
  1944. Like, gag me with a Merry Christmas!
  1945. No Way! Merry Christmas!
  1946. Like, so totally Merry Christmas!
  1947. Barf me out with a Merry Christmas!
  1948. So gross! Merry Christmas!
  1949.  
  1950.  
  1951. I realize this is only five times, not fifteen, but you can multiprocess in
  1952. VALGOL.  Just get three valley girls and execute the above on each one.
  1953.  
  1954.             From: seismo!cornell!uw-beaver!ssc-vax!fluke!witters
  1955.  
  1956. ==========================================================================
  1957.  
  1958. /* VAX MACRO */
  1959. (VMS flavour...snicker)
  1960.  
  1961. ;
  1962. text:    .ascii    "Merry Christmas"    ; output text
  1963.     .byte    13,10            ; carriage control
  1964.     tlen     = . - text        ; text length
  1965. tty:    .ascid    "TT:"            ; logical name of current terminal
  1966. chan:    .blkw    1            ; storage for IO channel number
  1967.  
  1968.     .entry xmas,^M<r10>
  1969.     $ASSIGN_S    devnam=tty,chan=chan        ;get channel to terminal
  1970.     movl        #1,r10                ;initialize loop
  1971. loop:    $QIOW_S        chan=chan,func=#IO$_WRITELBLK,- ;dump the message
  1972.             P1=text,P2=#tlen
  1973.     aobleq        #15,r10,loop            ;15 times
  1974.     ret
  1975.     .end xmas
  1976.  
  1977.         From: seismo!decvax!microsof!ubc-vision!mprvaxa!tbray
  1978.  
  1979. ==========================================================================
  1980.  
  1981. /* Xerox Data Systems Metasymbol Assembler */    
  1982.  
  1983.          system       sig9
  1984.          system       bpm
  1985.          csect        1
  1986. message  text         'Merry Christmas'
  1987.          ref          m:lo
  1988. start    equ,0        $
  1989.          li,7         15
  1990. loop     equ,0        $
  1991.          m:write      m:lo,(buf,message),(size,15)
  1992.          bdr,7        loop
  1993.          m:exit      
  1994.          end          start
  1995.   
  1996.  
  1997.                                    Jon Bertoni
  1998.  
  1999. ==========================================================================
  2000.  
  2001. /*  XPL version.  (Defined in book "A Compiler Generator".)  */
  2002.  
  2003. dcl i fixed;
  2004.  
  2005. do i = 1 to 15;
  2006.  
  2007.      output = 'Merry Christmas';
  2008.  
  2009. end;
  2010.  
  2011.           --  chip elliott     ...decvax!dartvax!chip
  2012.  
  2013. ==========================================================================
  2014. -- 
  2015.  
  2016.                     Don Davis
  2017.                     JHU/APL
  2018.                 ...decvax!harpo!seismo!umcp-cs!aplvax!ded
  2019.                 ...rlgvax!cvl!umcp-cs!aplvax!ded
  2020.  
  2021.  
  2022. Article 257 of comp.sources.misc:
  2023. Path: puukko!santra!tut!enea!mcvax!uunet!lll-winken!lll-lcc!ames!necntc!ncoast!allbery
  2024. From: peter@sugar.UUCP (Peter da Silva)
  2025. Newsgroups: comp.sources.misc
  2026. Subject: v03i080: Re: v03i076: Just for fun (something which once appeared on the net)
  2027. Message-ID: <8807130507.AA26710@uunet.UU.NET>
  2028. Date: 13 Jul 88 05:07:49 GMT
  2029. Sender: allbery@ncoast.UUCP
  2030. Reply-To: peter@sugar.UUCP (Peter da Silva)
  2031. Lines: 34
  2032. Approved: allbery@ncoast.UUCP
  2033.  
  2034. Posting-number: Volume 3, Issue 80
  2035. Submitted-by: "Peter da Silva" <peter@sugar.UUCP>
  2036. Archive-name: more-xmas
  2037.  
  2038. [Introducing the major motion picture:  THE CHRISTMAS THAT WOULDN'T DIE!  Now
  2039. showing at theaters near you!!!  ;-)  ++bsa]
  2040.  
  2041. Ratfor (from the book, with the DEC F4P Fortran):
  2042.  
  2043.     do(i=1,15) type *, 'Merry Christmas'
  2044.     end
  2045.  
  2046. Ratforth (AKA Fifth, a language I hacked up to make Forth less ugly):
  2047.  
  2048.     define christmas { 
  2049.         do(15,0) { 
  2050.             type(count("Merry Christmas"));
  2051.             CR;
  2052.         }
  2053.     }
  2054.  
  2055. This produces, by the way:
  2056.  
  2057.     : christmas 15 0 do " Merry Christmas" count type CR ;
  2058.  
  2059. AREXX:
  2060.  
  2061.     /* Say Merry Christmas 15 times */
  2062.     do i=1 to 15
  2063.         say 'Merry Christmas'
  2064.         end i
  2065. ---
  2066. -- `-_-' Peter (have you hugged your wolf today?) da Silva.
  2067. --   U   Mail to ...!uunet!sugar!peter, flames to alt.dev.null.
  2068. -- "Running OS/2 on a '386 is like pulling your camper with an Indy car"
  2069.  
  2070.  
  2071.